﻿using Castle.MicroKernel.Registration;
using Castle.MicroKernel.SubSystems.Configuration;
using Castle.Windsor;
using SimpleTasks.Domain.Repositories;

namespace SimpleTasks.IoC.Installers
{
   public class RepositoryInstaller : IWindsorInstaller
   {
      public void Install(IWindsorContainer container, IConfigurationStore store)
      {
         container.Register(Classes.FromThisAssembly()
                           .BasedOn(typeof(IRepository<>))
                           .WithServiceDefaultInterfaces()
                           .LifestyleTransient());
      }
   }
}
